package com.blockchain.front.servlets.security;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.blockchain.common.enums.JymmType;
import com.blockchain.framework.resource.PromptLevel;
import com.blockchain.framework.service.ServiceSession;
import com.blockchain.front.service.security.SecurityManage;
import com.blockchain.util.parser.EnumParser;

public class Jymmsz extends AbstractSceurityServlet {

	private static final long serialVersionUID = 1L;
	@Override
	protected void processPost(HttpServletRequest request,
			HttpServletResponse response, ServiceSession serviceSession)
			throws Throwable {
		JymmType tpwdsetting=EnumParser.parse(JymmType.class, request.getParameter("tpwdsetting"));
		String paypassword=request.getParameter("paypassword");
		SecurityManage manage = serviceSession.getService(SecurityManage.class);
		manage.jymmSz(tpwdsetting,paypassword);
		getController().prompt(request, response, PromptLevel.INFO,"交易密码输入设置成功");
		sendRedirect(request, response, getController().getURI(request, Jymmsz.class));
	}

}